#ANTLR = ../../antlrworks-1.4.3.jar
ANTLR = ../../antlrworks-1.5rc2.jar
#ANTLR = ../../antlr-4.0-rc-1-complete.jar

run: Test
	java -cp $(ANTLR):. Test < main.c

Test: Parser TreeParser
	javac -cp $(ANTLR):. CParser.java CLexer.java CSyntaxTree.java Test.java
	#TestTreeIterator.java
	#javac -cp $(ANTLR):. Test.java TestTreeIterator.java

Parser: C.g
	java -cp $(ANTLR):. org.antlr.Tool C.g

TreeParser: CSyntaxTree.g Parser
	java -cp $(ANTLR):. org.antlr.Tool CSyntaxTree.g


.PHONY: clean

clean:
	rm -f *.class